<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">


    <title> - 添加变量</title>
    <meta name="keywords" content="">
    <meta name="description" content="">
    <link href="/static/admin/layui/css/layui.css" rel="stylesheet">
    <link rel="shortcut icon" href="/favicon.ico"> <link href="/static/admin/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="/static/admin/css/font-awesome.css?v=4.4.0" rel="stylesheet">

    <link href="/static/admin/css/animate.css" rel="stylesheet">
    <link href="/static/admin/css/style.css?v=4.1.0" rel="stylesheet">


</head>

<body class="gray-bg">
    <div class="row wrapper border-bottom white-bg page-heading">
        <div class="col-sm-4">
            <h2>修改信息</h2>
            <ol class="breadcrumb">
                <li>
                    <a href="{:url('Index/admin')}">主页</a>
                </li>
                <li>
                    <strong>修改信息</strong>
                </li>
            </ol>
        </div>
    </div>
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="row">
             <div class="col-sm-12">
			 
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>修改设备信息</h5>
					</div>
                    <div class="ibox-content">
                        <form class="form-horizontal">
                             <input type="hidden" id="sd" name="sid" value="{$data.sid}">
                            <div class="form-group">
                                <label class="col-sm-2 control-label">学生名字：</label>
                                <div class="col-sm-4">
                                    <input type="text" placeholder="名称" id="name" value="{$data.sname}" class="form-control">
                                </div>
                                <div class='col-sm-6'></div>
                            </div>
                             <div class="form-group">
                                <label class="col-sm-2 control-label">电话：</label>
                                <div class="col-sm-4">
                                    <input type="text" placeholder="请修改电话"  id="tel" value="{$data.stel}" class="form-control">
                                </div>
                                <div class='col-sm-6'></div>
                            </div>
                             <div class="form-group">
                                <label class="col-sm-2 control-label">邮箱：</label>
                                <div class="col-sm-4">
                                    <input type="text" placeholder="邮箱" id="email" value="{$data.semai}" class="form-control">
                                </div>
                                <div class='col-sm-6'></div>
                            </div>
                             <div class="form-group">
                                <label class="col-sm-2 control-label">学生地址：</label>
                                <div class="col-sm-4">
                                    <input type="text" placeholder="具体到市省县乡镇" id="add" value="{$data.sadd}" class="form-control">
                                </div>
                                <div class='col-sm-6'></div>
                            </div>
                         
                             <div class="">
                                  <label class="col-sm-2 control-label">状态：</label>
                                  签约成功
                                  <input value="1" {if condition="$data.sstatus eq 1"} checked {/if}   type="radio" name="sstatus" class="status"/>
                                  跟进中
                                  <input value="2" type="radio" name="sstatus" class="status" {if condition="$data.sstatus eq 2"} checked {/if}  />
                                  
                                  失败
                                  <input value="0" type="radio" name="sstatus" class="status"   {if condition="$data.sstatus eq 0"} checked {/if} />
                                  
                                </div>
                                <div class='col-sm-6'></div>

                       

                            
                            <div class="form-group">
                                <div class="col-sm-offset-2 col-sm-9">
                                    <button class="btn btn-sm btn-info" type="button" id="adds">保 存</button>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
		</div>
	</div>
    <!-- 全局js -->
    <script src="/static/admin/js/jquery.min.js?v=2.1.4"></script>
    <script src="/static/admin/js/bootstrap.min.js?v=3.3.6"></script>

    <!-- 自定义js -->
    <script src="/static/admin/js/content.js?v=1.0.0"></script>
    <script src="/static/admin/layui/layui.js"></script>
    <script>
        

        layui.use('layer', function(){ //独立版的layer无需执行这一句
            var $ = layui.jquery, layer = layui.layer; //独立版的layer无需执行这一句
            //点击提交
            $("#adds").click(function(){
               var s= $("#tel").val();
               alert(s);
               var aaa= $("input[type='radio']:checked").val();
               // alert(aaa);
               $.post("{:url('Student/sav')}",{sid:$("#sd").val(),sname:$("#name").val(),semai:$("#email").val(),stel:$("#tel").val(),sadd:$("#add").val(),sstatus:aaa},function(msg){
                   if (msg==1) {
                     layer.msg("修改成功");
                    window.location.href = "{:url('Student/index')}";
                   }else{
                    layer.msg("修改失败");
                   }
               })
            });
        });
    </script>
    
    

</body>

</html>
